/* const template = (id ,obj)  => {
    let html = document.querySelector('#'+ id).innerHTML
    let reg = /{{(\w+)}}/g
    let res = html.replace(reg, (...asgr) => obj[asgr[1]])
    return res
} */

const template = (id,obj) {
    let html = document.querySelector('#'+id).innerHTML
    let reg = /{{(\w+)}}/g
    let res = html.replace(reg,(...arsg) => obj[arsg[1]])
    return res
}